package com.sx.pipeline.adapter

import com.bumptech.glide.Glide
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.noober.background.view.BLImageView
import com.sx.pipeline.R
import com.sx.pipeline.repos.http.res.StudyCenterVO

/**
 * @Author：YY
 * @Date：2022/2/10
 * @Describe: 学习中心列表适配器
 */
class LearningCenterAdapter(dataList: MutableList<StudyCenterVO>) : BaseQuickAdapter<StudyCenterVO, BaseViewHolder>
    (R.layout.item_learning_center, dataList) {

    override fun convert(holder: BaseViewHolder, item: StudyCenterVO) {
        holder.setText(R.id.tv_title,item.title)
        holder.setText(R.id.tv_time,item.createTime)
        val ivImage=holder.getView<BLImageView>(R.id.iv_img)
        Glide.with(context).load(item.titleImage).into(ivImage)

    }
}